#!/bin/bash

# Check WARP3D_HOME
if [ -z "$WARP3D_HOME" ]; then
   printf "[ERROR]\n"
   printf "... Environment variable WARP3D_HOME is not set.\n"
   printf "Quitting...\n"
   exit 1
fi

cd $WARP3D_HOME

file_1="http://www.dropbox.com/s/rvkfjlh4gs6dfub/warp_external_libs.tar.gz"
file_2="http://www.dropbox.com/s/y5z0s6qzsdqdtd8/pat2exII_external_libs.tar.gz"

#wget http://warp3d.googlecode.com/files/warp_external_libs.tar.gz $file_1
wget --no-check-certificate -O warp_external_libs.tar.gz $file_1
tar xvzf warp_external_libs.tar.gz
rm warp_external_libs.tar.gz

cd $WARP3D_HOME/pat2exII
#wget http://warp3d.googlecode.com/files/pat2exII_external_libs.tar.gz
wget --no-check-certificate -O pat2exII_external_libs.tar.gz $file_2
tar xvzf pat2exII_external_libs.tar.gz
rm pat2exII_external_libs.tar.gz
